/*
 * Project Beknyou
 * Copyright (c) 2010-2011 Saint Paul College, All Rights Reserved
 * Redistributions in source code form must reproduce the above
 * Copyright and this condition.
 * The contents of this file are subject to the GNU General Public
 * License, Version 2 (the "License"); you may not use this file
 * except in compliance with the License. A copy of the License is
 * available at http://www.opensource.org/licenses/gpl-license.php.
 */
package com.benkyou.client.systems;
import com.jme3.asset.AssetManager;
import com.jme3.scene.Spatial;
import com.jme3.texture.Texture;
import com.jme3.util.SkyFactory;
/**
 *
 * @author Austin Allman
 */
public class SkySystem{
    private AssetManager mgr;
    private String path;
    private Spatial sky;
    private boolean shape;
    /**
     * 
     */
    public final static String DEFAULT_SKY ="Textures/Sky/Day/Skysphere.jpg";
    /**
     * 
     */
    public final static String DEFAULT_SKYBOX = "Textures/Sky/Box/Mountain.png";
    private String NORTH, EAST, SOUTH, WEST, TOP, BOTTOM;
    /**
     * 
     * @param mgr
     */
    public SkySystem(AssetManager mgr){
        this.mgr = mgr;
        path = DEFAULT_SKY;
        shape = true;
        createSimpleSky();

    }
    /**
     * 
     * @param path
     * @param mgr
     * @param shape
     */
    public SkySystem(String path, AssetManager mgr, boolean shape){
        this.path = path;
        this.mgr = mgr;
        this.shape = shape;
        createSimpleSky();
    } 
    /**
     * 
     * @param path
     * @param shape
     */
    public void changeSky(String path, boolean shape){
        this.path = path;
        this.shape = shape;
        createSimpleSky();
    }
    /**
     * 
     */
    public void createDefaultSkyBox(){
        path = DEFAULT_SKYBOX;
        shape = false;
        createSimpleSky();
        
    }
    private void createSimpleSky(){
        sky = SkyFactory.createSky(mgr, path, shape);
    }
    /**
     * Experimental, do not use
     * 
     */
    private void setupComplexSky(String NORTH, String EAST, String SOUTH, String WEST, String TOP, String BOTTOM){
        this.NORTH = NORTH;
        this.EAST = EAST;
        this.SOUTH = SOUTH;
        this.WEST = WEST;
        this.TOP = TOP;
        this.BOTTOM = BOTTOM;
        Texture t;
    }
    private void createComplexSky(){
     //   sky = SkyFactory.createSky(mgr, WEST, EAST, NORTH, SOUTH, TOP, BOTTOM);
    }
    /**
     * 
     * @return
     */
    public Spatial getSky(){
        return sky;
    }
    
}

